home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 21 / macformat_21.iso / Shareware / Programación / VideoToolbox / TimeVideo results < prev    next >
Text File  |  1996-09-11  |  12KB  |  197 lines

  1. This file reports the timing and accuracy of all your video screens, as
  2. measured by TimeVideo, a component of the VideoToolbox. TimeVideo runs on all
  3. Macs, requiring only System 6.05 or better. To quickly test a large number of
  4. computers, run TimeVideo from a floppy disk; all the results will accumulate
  5. in a single results file. TimeVideo is free, and may be freely distributed.
  6. You can get the latest version from:
  7. ftp://mirror.apple.com/mirrors/info-mac/cfg/time-video-376.hqx
  8.  
  9. THE VIDEO TOOLBOX
  10. The VideoToolbox is a collection of two hundred C subroutines and several demo
  11. and utility programs that I and others have written to do visual psychophysics
  12. with Macintosh computers. It is fully compatible with 680x0 and PowerPC Macs
  13. and with Metrowerks CodeWarrior C and Symantec C compilers. It's free and may
  14. not be sold without permission. It should be useful to anyone who wants to
  15. present accurately specified visual stimuli or use the Mac for psychometric
  16. experiments. The text file "Video synch" discusses all the ways of
  17. synchronizing programs to video displays and the many pitfalls to avoid. The
  18. TimeVideo application checks out the timing of all video devices in
  19. anticipation of their use in critical real-time applications, e.g. movies or
  20. lookup table animation. Low-level routines control video timing and lookup
  21. tables, display real-time movies, and implement the luminance-control
  22. algorithms suggested by Pelli and Zhang (1991). (D.G. Pelli and L. Zhang,
  23. 1991, "Accurate control of contrast on microcomputer displays." Vision
  24. Research, 31, 1337-1350. Reprints are available.) In particular,
  25. GetPixelsQuickly and SetPixelsQuickly peek and poke pixels in bitmaps and
  26. pixmaps, CopyBitsQuickly and CopyWindows faithfully copy between bit/pixmaps
  27. and the screen, WindowToEPS saves an image to disk, for later printing or
  28. incorporation into a document, and SetEntriesQuickly and GDSetEntries load the
  29. screen's color lookup table, all without any of QuickDraw's color
  30. translations. High-level routines help analyze psychophysical experiments
  31. (e.g. graphing or maximum-likelihood fitting of psychometric data). Assign.c
  32. is a runtime C interpreter for C assignment statements, which is useful for
  33. controlling experiments and sharing calibration data. Many of the routines are
  34. Mac-specific, but some very useful routines, e.g. the luminance-control,
  35. statistics, maximum-likelihood fitting algorithms, and the runtime interpreter
  36. are written in Standard C and will work on any computer. Documentation is in
  37. the source files themselves. This collection has been continually updated
  38. since 1991. You can download the latest version of "video-toolbox" from a
  39. public archive, e.g.:
  40. ftp://sumex-aim.stanford.edu/info-mac/dev/lib/
  41. ftp://mirror.apple.com/mirrors/info-mac/dev/lib/
  42. ftp://mirrors.aol.com/pub/info-mac/dev/lib/
  43. ftp://src.doc.ic.ac.uk/packages/mac/info-mac/dev/lib/
  44. ftp://ftp.stolaf.edu/pub/macpsych/
  45. CompuServe://MacDev forum/Library 4 "C and Pascal"/VIDEOT.SEA
  46. Or you can request a file by email; for instructions send a query to
  47. Info-Mac-Request@sumex-aim.stanford.edu.
  48.  
  49. To get future versions automatically, just send me your name and email
  50. address. Each time I post a new version of the VideoToolbox to the Info-Mac
  51. Archives, I email a copy to everyone on the subscription list; there are
  52. currently over 170 subscribers. (Let me know if you prefer notification only,
  53. without the 3 MB enclosure.)
  54. Denis Pelli, denis@psych.nyu.edu, Psychology Dept., New York University, 6
  55. Washington Place, New York, NY 10003, USA
  56.  
  57.  
  58. TIME VIDEO
  59. Other than reading and writing pixels, all access to a video device normally
  60. goes through the software video driver. (You can use VideoToolbox
  61. SetEntriesQuickly.c to bypass the video driver of a few devices, but I don't
  62. recommend that, except as a last resort, because your program will then only
  63. work with the few video devices that SetEntriesQuickly.c supports.) The video
  64. driver is normally supplied in ROM on the video card or, for built-in video,
  65. in the computer's ROM. (Apparently, new PCI drivers can simply be tossed onto
  66. the System Folder.) Many drivers have subtle bugs that TimeVideo has uncovered
  67. and documented. A complete list of all known video driver bugs appears in the
  68. "Video bugs" document included in the VideoToolbox archive described above.
  69. Please send new bugs to denis@psych.nyu.edu
  70.  
  71. For each video card, TimeVideo measures the video frame rate, frequency of VBL
  72. interrupts (ought to be one per frame), how long it takes to load the clut
  73. (ought to be one frame or less), and how much of the screen you can fill with
  74. a real-time one-image-per-frame movie shown by CopyBits() or
  75. CopyBitsQuickly(). It then performs a random write-then-read test of the Color
  76. Lookup Table (clut). This tests the clut memory hardware and the software used
  77. to write and read the clut. We test writing by GDSetEntries(), which makes a
  78. cscSetEntries call to the video driver, and, if possible, we also test writing
  79. by SetEntriesQuickly(), which accesses the hardware directly.
  80. (SetEntriesQuickly supports only a few video cards.) In either case, the clut
  81. is read by GDGetEntries, which makes a cscGetEntries call to the video driver.
  82. The testing is thorough; many video devices fail at least part of the test.
  83. All the driver errors uncovered to date appear in the VideoToolbox "Video
  84. bugs" text file, and have been reported to the video card's manufacturer. Add
  85. your results by emailing this file to denis@psych.nyu.edu
  86.  
  87. Happily, we don't know of any cases of errors in cscSetEntries itself, and
  88. we've never run across a hardware failure of the CLUT memory. Our experience
  89. is that errors in the cscSetEntries/cscGetEntries write-then-read test of the
  90. CLUT occur in two ways: 
  91. 1. The driver does not implement cscSetGamma and the fixed gamma table is not
  92. the identity transformation, i.e. "uncorrected gamma table". TimeVideo always
  93. calls cscSetGamma, requesting an identity transform. In all drivers, the RGB
  94. values supplied in a cscSetEntries call are transformed by the gamma table
  95. before being loaded into the CLUT. The presence of a non-identity gamma table
  96. is usually obvious from a glance at the color matrix, since the gains in the
  97. matrix will exceed 1 by about twice the fractional rms error indicated by ±%.
  98. 2. The CLUT is set correctly, but the driver incorrectly implements
  99. cscGetEntries. Bugs in cscGetEntries are usually obvious from a glance at the
  100. color matrix, e.g. nonzero gains off the diagonal, or the pattern of errors.
  101.  
  102. The video driver on the PowerMac 7500 and 8500 supresses the VBL interrupt
  103. while it's loading the CLUT, so any VBL-frame-counting task will miss an
  104. interrupt each time you call cscSetEntries to load the clut. Calling
  105. cscSetEntries once per frame to synchronize your code with the frame should
  106. still work fine, but it'll be slightly tricky to check for overrun (i.e.
  107. taking too long between cscSetEntries calls), since a simple
  108. VBL-interrupt-based frame counter will run differently on different Macs.
  109.  
  110. Errors reported by TimeVideo are usually due to bugs in the video driver
  111. software in the ROM of the video card (or built-in video device). If the bug
  112. will interfere with your experiments, then to use the card (or built-in video)
  113. you must either fix/replace the driver or bypass the driver, using
  114. SetEntriesQuickly to access the hardware directly (if SetEntriesQuickly
  115. supports it). I suggest that you try replacing the driver, because this will
  116. keep your software hardware-independent. The VideoToolbox "Video synch"
  117. document explains how to fix the the Mac IIci video driver, patching or
  118. replacing the buggy version 0 .Display_Video_Apple_RBV1 driver by copying the
  119. bug-free version 1 of the same driver from the Mac IIsi. It is very likely
  120. that an analogous approach could be used to fix/replace the buggy version 0,
  121. 1, and 2 .Display_Video_Apple_DAFB drivers in the Quadra 700, 750, and 900, by
  122. the bug-free version 3 or 5 of that driver in the Centris 650 or the LC 475.
  123. And please report your bugs; the bug-free revised drivers are probably the
  124. result of our past bug reports.
  125.  
  126. GLOSSARY
  127. A video frame is a complete refresh of your video screen. (With interlacing it
  128. takes two fields to do a complete refresh, i.e. a frame, but graphics displays
  129. usually are not interlaced and have a single field per frame.) To show a
  130. movie, you will want to reload the image once per frame; the table shows how
  131. big that image can be, as a fraction of the screen area, and still be reloaded
  132. once per frame. (Some video cards have multiple video "pages"--call
  133. GDGetPageCnt()--that can be switched by calling GDSetPageDrawn() and
  134. GDSetPageShown().) A "VBL" interrupt is produced by your video card, nominally
  135. once per frame, but some video cards produce more, which is poor, but not
  136. serious. (The VBLInstall.c program will deal with it.) Suppressed interrupts
  137. during clut updates are bad. It means that the driver disables the VBL
  138. interrupt for too long while it's loading the clut. This will throw off any
  139. interrupt-based attempt to count frames. (The clut is the color lookup table
  140. of your video card.) Lookup table animation, e.g. for temporal modulation of
  141. contrast, requires that you reload the clut once per frame, so it's very
  142. important that this be fast enough. The first call to SetEntriesQuickly() for
  143. each device is slow--a cache is filled; the reported times are for subsequent
  144. calls. Each video card can be in "Color" or "Gray" mode, as set by the Control
  145. Panel:Monitors or the Macintosh Toolbox call SetDepth(). In "Gray" mode all
  146. colors are transformed to luminance-equivalent grays. This is done by the
  147. video driver, when loading the clut, but only if the pixelSize≤8. TimeVideo
  148. does a linear regression on the results of write-then-read tests of the CLUT
  149. to measure the driver's color transformation matrix. It reports the matrix if
  150. it is other than the identity transformation:
  151. (ROut) (1 0 0) (RIn)
  152. (GOut)=(0 1 0)x(GIn)
  153. (BOut) (0 0 1) (BIn)
  154. The clut tests try loading the clut serially, one entry at a time, and all at
  155. once; some video drivers fail the serial test. For more explanation see the
  156. text file called "Video synch" on the VideoToolbox disk.
  157.  
  158. "cscSetEntries ... NAN ... frames"= the driver refuses to load the CLUT.
  159. "ok"= passed all tests.
  160. "!gray"= passed the color test, but is supposed to be in gray mode.
  161. "!color"= passed the gray test, but is supposed to be in color mode.
  162. "!serial"= passed when loaded all at once, but failed when loaded serially.
  163. "bad"= read did not equal write and the error is reported explicitly.
  164. We know that SetEntriesQuickly is "!serial" on the Quadra, alas.
  165.  
  166. This is a SimpleText document using the Monaco font to line up the 
  167. columns properly.
  168.  
  169. TimeVideo version 3.7.6
  170. Wednesday, September 11, 1996.
  171. Compiled by Metrowerks CodeWarrior C 9.00 for PowerPC, 4B int and 8B double.
  172. Using RAM Doubler. 
  173. MF Colin Dalziel's PowerMac 6100/60, ppc601, System 7.5.3. GestaltMachineType
  174. 75.
  175.  
  176. PowerMac 6100/60 "Built-In DRAM Video" (.Display_Video_Apple_Sonora version 7)
  177. 8-bit dacs. 640x480 pixels. 
  178. pixel size                         1     2     4     8    16     bits     
  179. pages                              1     1     1     1     1              
  180. mode                              0x80  0x81  0x82  0x83  0x84            
  181. frame rate                        66.5  66.6  66.5  66.5  66.5   Hz       
  182. interrupts per frame               1.0   1.0   1.0   1.0   1.0            
  183. CopyBits movie size                4.55  2.50  1.27  0.58  0.22  screen   
  184. CopyBitsQuickly movie size         3.69  2.23  1.19  0.57  0.22  screen   
  185. CopyBits data rate                11.09 12.19 12.33 11.30  8.61  MB/s     
  186. CopyBitsQuickly data rate          9.00 10.88 11.63 11.20  8.57  MB/s     
  187. cscSetEntries duration             1.00  1.00  1.00  1.00  1.00  frames   
  188. cscSetEntries suppresses ints.for  0.0   0.0  -0.0   0.0  -0.0   frames   
  189. GDSetEntriesHighPriority duration  1.00  1.00  1.00  1.00  1.00  frames   
  190. color: cscSetEntries test            ok    ok    ok    ok    ok           
  191. gray: cscSetEntries test             ok    ok    ok    ok    ok           
  192.  (ROut± 0.4%) (0.30 0.59 0.11) (RIn)
  193.  (GOut± 0.4%)=(0.30 0.59 0.11)x(GIn)
  194.  (BOut± 0.4%) (0.30 0.59 0.11) (BIn)
  195.  
  196.  
  197.